package com.lk.lkappearance.common;

import com.lk.lkappearance.utills.ResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AbstractBaseProvider {

    protected final static String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded";

    protected final static String APPLICATION_JSON = "application/json";

    protected final static Logger log = LoggerFactory.getLogger(AbstractBaseProvider.class);

    protected ResultEntity getResultEntity() {
        return new ResultEntity();
    }

    protected ResultEntity success() {
        return getResultEntity().setSuccess();
    }

    protected ResultEntity success(String msg) {
        return getResultEntity().setSuccess(msg);
    }

    protected ResultEntity fail() {
        return getResultEntity().setFail();
    }

    protected ResultEntity fail(String msg) {
        return getResultEntity().setFail(msg);
    }

    protected ResultEntity notRegister() {
        return getResultEntity().setNotRegister();
    }

    protected ResultEntity tokenOutTime() {
        return getResultEntity().setTokenOutTime();
    }

    protected ResultEntity noPermissions() {
        return getResultEntity().setNoPermissions();
    }

    protected ResultEntity error() {
        return getResultEntity().setError();
    }

    protected ResultEntity registered() {
        return getResultEntity().setRegistered();
    }
}
